/***************************************************************************
 *   Copyright (C) 2005 by xihe                                            *
 *   xihels@163.com                                                        *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 *   This program is distributed in the hope that it will be useful,       *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *   GNU General Public License for more details.                          *
 *                                                                         *
 *   You should have received a copy of the GNU General Public License     *
 *   along with this program; if not, write to the                         *
 *   Free Software Foundation, Inc.,                                       *
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
 ***************************************************************************/
#include "Packet.h"
#include "ChangeStatus.h"
#include "ClusterOperate.h"
#include "ClusterOperateReply.h"
#include "ClusterSendIM.h"
#include "DownloadGroupFriend.h"
#include "ClusterInfoReply.h"
#include "ClusterMemberInfoReply.h"
#include "FriendList.h"
#include "ReceiveIM.h"
#include "SendIM.h"

#include "RegisterInPacket.h"
#include "QQSession.h"
namespace {

    RegisterInPacket p1(QQ_CMD_RECV_IM,
	    TP<ReceiveIMPacket, QQSession, 
	    &QQSession::onIMPacket>::create);

    RegisterInPacket p2(QQ_CMD_SEND_IM,
	    TP<SendIMReplyPacket, QQSession, 
	    &QQSession::onSendIMReply>::create);

    RegisterInPacket p3(QQ_CMD_RECV_MSG_FRIEND_CHANGE_STATUS, 
	    TP<FriendChangeStatusPacket, QQSession,
	    &QQSession::onFriendChangeStatus>::create);

    RegisterInPacket p4(QQ_CMD_GET_FRIEND_ONLINE,
	    TP<GetFriendOnlineReplyPacket, QQSession,
	    &QQSession::onFriendOnlinePacket>::create);

    RegisterInPacket p5(QQ_CMD_CHANGE_STATUS,
	    TP<ChangeStatusReplyPacket, QQSession, 
	    &QQSession::onChangeStatus>::create);

    RegisterInPacket p6(QQ_CMD_GET_FRIEND_LIST,
	    TP<GetFriendListReplyPacket, QQSession,
	    &QQSession::onFriendListPacket>::create);

    RegisterInPacket p7(QQ_CMD_GROUP_DATA_OP,
	    TP<GroupDataOpReplyPacket, QQSession,
	    &QQSession::onGroupOpPacket>::create);

    RegisterInPacket p8(QQ_CMD_DOWNLOAD_GROUP_FRIEND,
	    TP<DownloadGroupFriendReplyPacket, QQSession, 
	    &QQSession::onDownloadGroupFriend>::create);

    RegisterInPacket p9(QQ_CMD_GET_USER_INFO,
	    TP<GetUserInfoReplyPacket, QQSession, 
	    &QQSession::onUserInfo>::create);
    
    RegisterInPacket p10(QQ_CMD_CLUSTER_CMD, QQ_CLUSTER_CMD_SEND_IM_EX,
	    TP<ClusterSendIMReplyPacket, QQSession, 
	    &QQSession::onClusterSendIMReply>::create);
    
    RegisterInPacket p11(QQ_CMD_CLUSTER_CMD, QQ_CLUSTER_CMD_GET_ONLINE_MEMBER,
	    TP<GetClusterOnlineMemberReplyPacket, QQSession, 
	    &QQSession::onClusterOnlineMember>::create);

    RegisterInPacket p12(QQ_CMD_CLUSTER_CMD, QQ_CLUSTER_CMD_GET_MEMBER_INFO,
	    TP<GetClusterMemberInfoReplyPacket, QQSession, 
	    &QQSession::onClusterMember>::create);

    RegisterInPacket p13(QQ_CMD_CLUSTER_CMD, QQ_CLUSTER_CMD_GET_CLUSTER_INFO,
	    TP<GetClusterInfoReplyPacket, QQSession, 
	    &QQSession::onClusterInfo>::create);
    
    RegisterInPacket p14(QQ_CMD_GET_LEVEL, 
	    TP<GetFriendLevelReplyPacket, QQSession, 
	    &QQSession::onFriendLevel>::create);

    RegisterInPacket p15(QQ_CMD_SEARCH_USER,
	    TP<SearchUserReplyPacket, QQSession, 
	    &QQSession::onSearchUser>::create);
}

